{{! Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
    for details. All rights reserved. Use of this source code is governed by a
    BSD-style license that can be found in the LICENSE file. }}

<div class="listing-sort-header">
  <div class="tooltip-base hoverable">
    <span class="tooltip-dotted">Sorted by:</span>
    <span id="sort-control" data-sort="{{sort_value}}">{{sort_name}}</span>
    <div class="tooltip-content tooltip-bottom-left">
      {{& ranking_tooltip_html }}
    </div>
  </div>
</div>

{{^is_search}}
<h2 class="listing-page-title">{{title}}</h2>
{{/is_search}}
{{#is_search}}
  <p class="package-count"><span>{{total_count}}</span> results for <code>{{search_query}}</code></p>
  {{#unsupported_qualifier}}
  <p class="feedback-critical">Your query contains an unsupported qualifier. Check the <a href="/help#search">supported search qualifiers</a>.</p>
  {{/unsupported_qualifier}}
{{/is_search}}

<ul class="package-list">
  {{#packages}}
    <li class="list-item -full">
      {{& score_box_html }}
      <h3 class="title"><a href="{{& url}}">{{name}}</a></h3>
      <p class="description">{{desc}}</p>
      {{#is_external}}
        <p class="metadata">v {{version}} • {{external_type}}</p>
      {{/is_external}}
      {{#show_metadata}}
      <p class="metadata">
        v <a href="{{& url}}">{{version}}</a>
        {{#show_dev_version}} / <a href="{{& dev_version_url}}">{{dev_version}}</a>{{/show_dev_version}}
        • Updated: <span>{{last_uploaded}}</span>
        {{& tags_html}}
      </p>
      {{/show_metadata}}
      {{#has_api_pages}}
      <div class="api_pages">
        API results:
        <ul>
        {{#api_pages}}
          <li><a href="{{& href}}">{{title}}</a></li>
        {{/api_pages}}
        </ul>
      </div>
      {{/has_api_pages}}
    </li>
  {{/packages}}
</ul>

{{#has_packages}}
  {{{pagination}}}
{{/has_packages}}
{{#is_search}}
  <p>Check our help page for <a href="/help#search">advanced search expressions</a>.</p>
{{/is_search}}
